﻿


using System;
using Microsoft.VisualStudio.TestTools.UnitTesting;

using Demo.Application;
using Demo.Infrastructure;
using Demo.ServiceContracts;


namespace Demo.Application.Test
{
    [TestClass]
    public class UserServiceImplTest
    {
        IUserService UserServiceimpl = null;

        [TestInitialize]
        public void Init()
        { 
            UserServiceimpl = ServiceLocator.Instance.GetService<IUserService>();
            ApplicationService.Initialize();
        }
        [TestMethod]
        public void TestGetUserDTOWithName()
        {
            var user0 = UserServiceimpl.GetUserDTOWithName("luoliang");
            var user1= UserServiceimpl.GetUserDTOWithName("luoliang");

            Assert.AreEqual(user0,user1);

        }
    }
}
